﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace pogra
{
    class Bullet
    {

        int power;
        float rotation;
        Entity target;
        Unit owner;

        public Bullet(int power,float rotation, Entity target, Unit owner)
        {
            this.power = power;
            this.rotation = rotation;
            this.target = target;
            this.owner = owner;
        }

        public void Update()
        {
            owner.report(target.takehit(power,rotation + Rand.nextFloat(-0.5,0.5)));
        }
    }
}
